import request from '@/utils/request'

// 查询一级菜谱分类列表
export function listCategory_top(query) {
  return request({
    url: '/recipes/category_top/list',
    method: 'get',
    params: query
  })
}

// 查询一级菜谱分类详细
export function getCategory_top(id) {
  return request({
    url: '/recipes/category_top/' + id,
    method: 'get'
  })
}

// 新增一级菜谱分类
export function addCategory_top(data) {
  return request({
    url: '/recipes/category_top',
    method: 'post',
    data: data
  })
}

// 修改一级菜谱分类
export function updateCategory_top(data) {
  return request({
    url: '/recipes/category_top',
    method: 'put',
    data: data
  })
}

// 删除一级菜谱分类
export function delCategory_top(id) {
  return request({
    url: '/recipes/category_top/' + id,
    method: 'delete'
  })
}
